﻿using BXH.Movie.Dal;
using BXH.Movie.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BXH.Movie.Bll
{
    public class MovieInfoService
    {
        private readonly MovieInfoDal movieInfoDal = new MovieInfoDal();
        public MovieInfoService()
        {

        }
        public IEnumerable<MovieInfoDto> GetMovieInfos()
        {
            return movieInfoDal.GetMovieInfos();
        }
        public bool Add(MovieInfo movieInfo)
        {
            return movieInfoDal.Add(movieInfo);
        }
        public bool Delete (int id)
        {
            return movieInfoDal.Delete(id);
        }

        public IEnumerable<MovieType> GetAllMovieType()
        {
            return movieInfoDal.GetAllMovieType();
        }
        public bool AddMovieType(MovieType movieType)
        {
            return movieInfoDal.AddMovieType(movieType);
        }
        public bool UpdateMovieType(MovieType movieType)
        {
            return movieInfoDal.UpdateMovieType(movieType);
        }
        public bool DeleteMovieType(int id)
        {
            return movieInfoDal.DeleteMovieType(id);
        }

        public bool Update(MovieInfo model)
        {
            return movieInfoDal.Update(model);
        }
    }
}
